
<!--钱包首页+交易-->

<style>	#binding-drop {  max-width: 250px;  left: 15px;  width: auto !important;  text-align: left; /*line-height: 1em;*/  }</style>

<!-- 第一部分 顶部topbar-->
<div class="topbar-container"  ng-include="'views/includes/topbar.html'"  ng-init="showCamera = true"> </div>


<!-- 第二部分 wallethome 所有tab标签-->
<div ng-controller="walletHomeController as home">
  	<div class="row columns m20tp" ng-show="index.noFocusedWallet">
    	<div class="text-center text-warning m20b">
			<i class="fi-alert"></i> 
			<span translate>You do not have a wallet</span> 
		</div>
    	<button class="button black round expand" ng-click="$root.go('add')" translate>Create</button>
    	<div class="text-center text-gray p20v" ng-click="$root.go('preferences')">  
			<button class=" outline round dark-gray tiny" translate> Preferences </button>  
		</div>
  	</div>

  	<div class="onGoingProcess" ng-show="index.isOffline">
    	<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
      		<div class="spinner">
				<div class="rect1"></div>
				<div class="rect2"></div>
				<div class="rect3"></div>
				<div class="rect4"></div>
				<div class="rect5"></div>
      		</div>
      		<span translate>Reconnecting to Wallet Service...</span>
    	</div>
  	</div>

  	<div class="onGoingProcess" ng-show="index.anyOnGoingProcess && !index.isOffline">
    	<div class="onGoingProcess-content">
      		<div class="spinner">
				<div class="rect1"></div>
				<div class="rect2"></div>
				<div class="rect3"></div>
				<div class="rect4"></div>
				<div class="rect5"></div>
      		</div>

      		<span translate ng-show="index.onGoingProcessName == 'openingWallet' || index.onGoingProcessName == 'updatingStatus'  || index.onGoingProcessName == 'updatingBalance' || index.onGoingProcessName == 'updatingPendingTxps'"> Updating Wallet... </span>
      		<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
      		<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
      		<span translate ng-show="index.onGoingProcessName == 'generatingCSV'">Generating .csv file...</span>
      		<span translate ng-show="index.onGoingProcessName == 'Syncing'">Syncing... {{index.syncProgress}}</span>
      		<span translate ng-show="index.onGoingProcessName == 'handling_private'">Syncing... {{index.count_unhandled_private_payments}} private payments left</span>
      		<span translate ng-show="index.onGoingProcessName == 'sending'">Sending...</span>
    	</div>
  	</div>

  	<div class="onGoingProcess" ng-show="home.onGoingProcess && !index.anyOnGoingProces && !index.isOffline">
    	<div class="onGoingProcess-content">
      		<div class="spinner">
				<div class="rect1"></div>
				<div class="rect2"></div>
				<div class="rect3"></div>
				<div class="rect4"></div>
				<div class="rect5"></div>
      		</div>
      		{{home.onGoingProcess|translate}}...
    	</div>
  	</div>

  	<div class="oh" ng-show="!index.noFocusedWallet">




	<!-- 首页  -->
	<div id="walletHome" class="walletHome tab-view tab-in">
	    <div style="position:absolute; width: 100%; left: 0px; top: 15px; text-align: center; color: white; z-index: 1" ng-if="home.isTestnet">{{home.testnetName}}</div>

		<div class="oh" style="position: relative;">

			<!--banner背景图-->
			<!--<div class="amount" style="background: #0745bc;" ng-swipe-right="index.suspendSwipe()" >-->
			<div class="amount" style="background:url('img/bg.png')" >
          		<div ng-if="!index.anyOnGoingProcess || 1" style="position: relative;">
            		<div ng-show="index.updateError" ng-click='index.openWallet(); index.updateTxHistory()'>
						<span class="size-12 db m10b">{{index.updateError|translate}}</span>
						<button class="outline white tiny round" translate>Tap to retry</button>
					</div>

            		<div ng-show="index.walletScanStatus == 'error'" ng-click='index.retryScan()'>
						<span translate>Scan status finished with error</span>
						<br>
						<span translate>Tap to retry</span>
					</div>

            		<ul rn-carousel rn-carousel-transition="hexagon" rn-carousel-index="index.assetIndex" rn-carousel-controls>
                		<li ng-click='index.onClick()' ng-show="!index.updateError && index.walletScanStatus != 'error'" ng-repeat="balance in index.arrBalances"  ng-cloak class="ng-cloak">
                      		<div ng-click='index.updateAll(); index.updateHistoryFromNetwork()'>

								<!--余额显示-->
								<strong class="size-36" ng-if="balance.asset == 'base' || balance.asset == index.BLACKBYTES_ASSET">{{balance.totalStr}}</strong>


                        		<div ng-if="balance.asset != 'base' && balance.asset != index.BLACKBYTES_ASSET">
									<div>
										<strong class="size-24">{{balance.total.toLocaleString()}}</strong>
									</div>
									<div class="of-asset">of {{balance.asset}}</div>
								</div>

								<!--等待确认中-->
								<div class="size-14" ng-if="balance.pending">
									<span translate>Including pending confirmation</span>:
									<span ng-if="balance.asset == 'base' || balance.asset == index.BLACKBYTES_ASSET">{{balance.pendingStr}}</span>
									<span ng-if="balance.asset != 'base' && balance.asset != index.BLACKBYTES_ASSET">{{balance.pending.toLocaleString()}}</span>
								</div>
							</div>

							<!-- <style ng-if="index.isCordova">  .rn-carousel-controls {display: none !important;}  </style> -->
            				<style> .rn-carousel-control.rn-carousel-control-next, .rn-carousel-control.rn-carousel-control-prev { background-color: {{index.backgroundColor}};} </style>

							<!--显示普通钱包时：  存有XXX钱在智能钱包-->
							<!--<div class="size-14" ng-if="balance.shared !== undefined">-->
							<div class="size-14" ng-if="!index.shared_address && balance.shared !== undefined">
								<a ng-click="index.openSubwalletModal()">
									<span translate>Also</span>
									<span ng-if="balance.asset == 'base' || balance.asset == index.BLACKBYTES_ASSET">{{balance.sharedStr}}</span>
									<span ng-if="balance.asset != 'base' && balance.asset != index.BLACKBYTES_ASSET">{{balance.shared.toLocaleString()}}</span>
									<span translate>in smart wallets</span>
								</a>
                      		</div>


							<!--显示智能钱包时：  存有XXX钱在普通钱包-->
							<div class="size-14" ng-if="index.shared_address">
								<a ng-click="index.openSubwalletModal()">
									<span translate>Also</span>
									<span ng-if="balance.asset == 'base' || balance.asset == index.BLACKBYTES_ASSET">{{index.commonBalances}}</span>
									<!--<span ng-if="balance.asset != 'base' && balance.asset != index.BLACKBYTES_ASSET">{{balance.totalStr}}</span>-->
									<span translate>in ordinary wallets</span>
								</a>
							</div>
                		</li>
            		</ul>

            		<!-- banner下面的导航点 -->
            		<!-- <div rn-carousel-indicators ng-if="index.arrBalances.length > 1" slides="index.arrBalances" rn-carousel-index="index.assetIndex"></div> -->
				</div>

          		<div ng-if="index.anyOnGoingProcess && 0">
            		<div class="size-36">
              			<strong>...</strong>
            		</div>
          		</div>
        	</div>
   			<!-- amount -->

  			<!-- 钱包头像 + 点击设置 -->
        	<!--<div class="pr columns line-b">-->
				<!--钱包头像-->
          		<!--<div class="avatar-wallet left"  style="border-radius: 50%;"  ng-style="{'background-color':index.backgroundColor}">{{ (index.alias || index.walletName) | limitTo: 1}} </div>-->
          		<!--<div class="right">-->
					<!--点击进入钱包设置-->
            		<!--<a ng-click="$root.go('preferences')" class="button outline round light-gray tiny preferences-icon m0" ng-if="!index.shared_address">-->
						<!--<i class="fi-widget size-18 vm wallet-settings"></i>-->
						<!--<span class="show-for-medium-up" translate>Preferences</span>-->
					<!--</a>-->
						<!--点击进入智能钱包-->
            		<!--<a ng-click="openSharedAddressDefinitionModal(index.shared_address)" class="button outline round light-gray tiny preferences-icon m0" ng-if="index.shared_address">-->
						<!--<i class="fi-eye size-24 vm wallet-settings"></i>-->
						<!--<span class="show-for-medium-up" translate>Definition</span>-->
					<!--</a>-->
          		<!--</div>-->

          		<!--<div class="wallet-info">-->
              		<!--<p class="m0">-->
						<!--{{(index.alias || index.walletName)}}-->
						<!--<span ng-if="index.shared_address" style="overflow:hidden; text-overflow: ellipsis; white-space: nowrap;">-->
							<!--<br>-->
							<!--Smart wallet:-->
							<!--{{index.shared_address | limitTo: 6}}-->
							<!--...-->
						<!--</span>-->
					<!--</p>-->
              		<!--<div class="size-12 text-gray" ng-if="!index.shared_address">-->
						<!--<span ng-include="'views/includes/walletInfo.html'"></span>-->
					<!--</div>-->
          		<!--</div>-->
        	<!--</div>-->

			<!--在智能钱包中显示-->
			<a ng-click="openSharedAddressDefinitionModal(index.shared_address)"
			   ng-if="index.shared_address"
			   style="position: absolute;right: 5px;bottom: 20px;display: block;height: 25px;width: 38px;border-radius:5px;padding-left:0;color: #fff;border: 1px solid #fff;overflow: hidden">
				<i class="fi-eye size-24 " style="position: absolute;left:9px;top: -5px; "></i>
				<!--<span class="show-for-medium-up" translate>Definition</span>-->
			</a>
      	</div> <!-- oh -->



      	<div ng-if="index.txps[0]">
        	<h4 ng-show="index.requiresMultipleSignatures" class="title m0" translate>Payment Proposals</h4>
        	<h4 ng-show="!index.requiresMultipleSignatures" class="title m0" translate>Unsent transactions</h4>
        	<div class="last-transactions pr" ng-repeat="tx in index.txps"  ng-include="index.txTemplateUrl"> </div>
        	<div class="text-gray text-center size-12 p10t"  ng-show="index.lockedBalanceBytes && !index.updatingStatus">
          		<span translate>Total Locked Balance</span>:
          		<b>{{index.lockedBalanceStr}} </b>
        	</div>
      	</div>
      	<div class="extra-margin-bottom" style="height:1px;"></div>



		<!-- 交易记录添加到home首页 修改代码 -->
		<!-- <div id="history" class="history tab-view"> -->
		<div style="height:calc(100% - 160px);width:100%;position: absolute;overflow: auto;">

			<!--判断isCordova 电脑端   电脑端添加init初始化交易历史  -->
			<div ng-if="!index.isCordova" id="history" class="history" ng-init="index.updateTxHistory()">
			<!-- <div ng-show="index.arrBalances.length > 1">
        		<h4 class="title m0" style="padding:0 10px;">
            		<select class="m10t" ng-model="index.assetIndex" ng-options="index.arrBalances.indexOf(balance) as (balance.asset === 'base' || balance.asset == index.BLACKBYTES_ASSET  ? balance.totalStr : balance.total.toLocaleString() + ' of ' + balance.asset) for balance in index.arrBalances" ng-disabled="home.blockUx || home.lockAsset" ng-change="index.updateHistory()"></select>
        		</h4>
      		</div> -->
				<div class="row m20t" ng-show="!index.txHistory[0] && !index.updatingTxHistory[index.walletId]">
					<div class="large-12 columns">
						<div class="oh text-center">
            				<span ng-show="index.txHistoryError" ng-click='index.updateTxHistory()'>
              					<p class="size-12 m10b db text-gray" translate>Could not fetch transaction history</p>
              					<button class="outline round light-gray tiny" translate>Tap to retry</button>
            				</span>

							<span ng-if="!index.txHistoryError" translate>
              					No transactions yet
            				</span>
						</div>
					</div>
				</div>

				<div class="row m20t text-center" ng-show="index.updatingTxHistory[index.walletId]">
					<div class="columns large-12 medium-12 small-12">
						<div class="spinner">
							<div class="rect1"></div>
							<div class="rect2"></div>
							<div class="rect3"></div>
							<div class="rect4"></div>
							<div class="rect5"></div>
						</div>
					</div>

        			<div ng-show="index.txProgress > 6" translate class="size-12 text-gray m20t">
          				Initial transaction history synchronization can take some minutes for wallets with many transactions.
						<br/>
          				Please stand by.
        			</div>

					<div ng-show="index.txProgress > 6" class="size-14 text-gray m20t">
          				<b>{{index.txProgress}}</b>
          				<span translate>
							Transactions
							<br>
							Downloaded
						</span>
        			</div>
      			</div>

				<div ng-show="index.txHistory[0]">
					<div ng-repeat="btx in index.txHistory" ng-click="home.openTxModal(btx)" class="row collapse last-transactions-content">

						<!--交易的 四种状态  -->
						<!--<div class="large-3 medium-3 small-3 columns">-->
						<div class=" small-3 columns">
							<!--已收到  确认+收到 -->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu radius bg0745bc"
								ng-show="btx.action == 'received' && btx.confirmations"
								translate>
								Received
							</span>
							<!--已发送  确认+发送-->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu bga1a1a1 radius"
								ng-show="btx.action == 'sent' && btx.confirmations"
								translate>
								Sent
							</span>
							<!--收到+发送  待确认-->
							<span
								style="font-size: 8px;width: 90px;padding: 6px 0;"
								class="label tu bgred radius"
								ng-show="!btx.confirmations || btx.confirmations == 0"
								translate>
								Unconfirmed
							</span>


							<!--移动资产-->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu light-gray radius"
								ng-show="btx.action == 'moved' && btx.confirmations"
								translate>
								Moved
							</span>
							<!--移动资产 结束-->


							<span style="font-size: 12px;width: 100px;padding: 6px 0;" class="label tu warning radius" ng-show="btx.action == 'invalid'" translate>Invalid</span>
						</div>



						<!--交易的 四种状态 对应四种符号-->
						<div class="large-4 medium-4 small-4 columns m5r" style="padding:3px 0 0 10px;font-weight: bold;width: 140px; ">
							<span class="size-16">
				  				<span ng-if="btx.action == 'received'">+</span>
				  				<span ng-if="btx.action == 'sent'">-</span>
				  				<span class="size-12" ng-if="btx.action == 'invalid'" translate> (possible double spend) </span>
								<!--金额-->
				  				<span ng-if="btx.action != 'invalid'">  {{btx.amountStr}}   </span>
							</span>
						</div>

						<!--交易发生时间-->
						<div class="large-3 medium-3 small-3 columns text-right " style=" width: 108px;">
							<div class="m5t size-12 text-gray">
								<time ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
								<span translate class="text-warning" ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)"> Unconfirmed  </span>
							</div>
						</div>

						<!--右箭头-->
			  			<div class="large-1 medium-1 small-1 columns text-right" style="width: 10px; float: right;">
							<i class="icon-arrow-right3 size-14 text-gray"></i>
			  			</div>

						<!--添加清楚浮动fix bug-->
						<div style="clear: both;"></div>
						<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
							<div ng-show="btx.message">
								<span translate>Note</span>
								: {{btx.message}}
							</div>

							<div ng-show="!btx.message">
								<span translate>To</span>
								: {{index.addressbook[btx.addressTo] || btx.addressTo}}
							</div>
						</div>
					</div>

					<div class="row m20t text-center" ng-show="index.historyRendering">
						<div class="columns large-12 medium-12 small-12">
							<div class="spinner">
								<div class="rect1"></div>
								<div class="rect2"></div>
								<div class="rect3"></div>
								<div class="rect4"></div>
								<div class="rect5"></div>
							</div>
						</div>
					</div>

					<div class="row m20t">
						<div class="large-6 medium-6 small-6 columns">
							<button type="submit" class="button black round expand" ng-show="index.historyShowShowAll"
									ng-click="index.showAllHistory()"
									style="background: transparent;color: #0095ff;font-size: 12px;padding: 10px;border: 1px solid #0095ff;" translate>
								Show all
							</button>
						</div>

						<!-- 判断isCordova 电脑端下载CSV文件 -->
						<div class="large-6 medium-6 small-6 columns" ng-show="!index.isCordova">
							<input id="export_file" type="file" nwsaveas="TrustNote-{{index.alias || index.walletName}}.csv" accept=".csv" style="display:none">
							<a class="button outline round" ng-click="index.csvHistory();" style="color: #0095ff;border: 1px solid #0095ff;font-size: 12px;padding: 10px;width: 100%;">
								<i class="fi-page-export-csv"></i>
								<span translate>Download CSV file</span>
							</a>
						</div>
					</div>
				</div>
				<div class="extra-margin-bottom"></div>
			</div>
	<!--判断isCordova  电脑端  结束-->



	<!--判断isCordova  移动端-->
			<div ng-if="index.isCordova" id="history" class="history">
			<!--<div ng-if="!index.isCordova" id="history" class="history" ng-init="index.updateTxHistory()">-->
				<!-- <div ng-show="index.arrBalances.length > 1">
                    <h4 class="title m0" style="padding:0 10px;">
                        <select class="m10t" ng-model="index.assetIndex" ng-options="index.arrBalances.indexOf(balance) as (balance.asset === 'base' || balance.asset == index.BLACKBYTES_ASSET  ? balance.totalStr : balance.total.toLocaleString() + ' of ' + balance.asset) for balance in index.arrBalances" ng-disabled="home.blockUx || home.lockAsset" ng-change="index.updateHistory()"></select>
                    </h4>
                  </div> -->
				<div class="row m20t" ng-show="!index.txHistory[0] && !index.updatingTxHistory[index.walletId]">
					<div class="large-12 columns">
						<div class="oh text-center">
            				<span ng-show="index.txHistoryError" ng-click='index.updateTxHistory()'>
              					<p class="size-12 m10b db text-gray" translate>Could not fetch transaction history</p>
              					<button class="outline round light-gray tiny" translate>Tap to retry</button>
            				</span>

							<span ng-if="!index.txHistoryError" translate>
              					No transactions yet
            				</span>
						</div>
					</div>
				</div>

				<div class="row m20t text-center" ng-show="index.updatingTxHistory[index.walletId]">
					<div class="columns large-12 medium-12 small-12">
						<div class="spinner">
							<div class="rect1"></div>
							<div class="rect2"></div>
							<div class="rect3"></div>
							<div class="rect4"></div>
							<div class="rect5"></div>
						</div>
					</div>

					<div ng-show="index.txProgress > 6" translate class="size-12 text-gray m20t">
						Initial transaction history synchronization can take some minutes for wallets with many transactions.
						<br/>
						Please stand by.
					</div>

					<div ng-show="index.txProgress > 6" class="size-14 text-gray m20t">
						<b>{{index.txProgress}}</b>
						<span translate>
							Transactions
							<br>
							Downloaded
						</span>
					</div>
				</div>

				<div ng-show="index.txHistory[0]">
					<div ng-repeat="btx in index.txHistory" ng-click="home.openTxModal(btx)" class="row collapse last-transactions-content">

						<!--交易的 四种状态  -->
						<!--<div class="large-3 medium-3 small-3 columns">-->
						<div class=" small-3 columns">
							<!-- 已收到 -->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu radius bg0745bc"
								ng-show="btx.action == 'received' && btx.confirmations"
								translate>
								Received
							</span>
							<!-- 已收到 结束-->


							<!-- 已发送 -->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu bga1a1a1 radius"
								ng-show="btx.action == 'sent' && btx.confirmations"
								translate>
								Sent
							</span>
							<!-- 已发送 结束-->


							<!-- 待确认 -->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu bgred radius"
								ng-show="!btx.confirmations || btx.confirmations == 0"
								translate>
								Unconfirmed
							</span>
							<!-- 待确认 结束-->


							<!-- 移动资产 -->
							<span
								style="font-size: 12px;width: 90px;padding: 6px 0;"
								class="label tu light-gray radius"
								ng-show="btx.action == 'moved' && btx.confirmations"
								translate>
								Moved
							</span>
							<!-- 移动资产 结束-->


							<span style="font-size: 12px;width: 100px;padding: 6px 0;" class="label tu warning radius" ng-show="btx.action == 'invalid'" translate>Invalid</span>
						</div>



						<!--交易的 四种状态 对应四种符号-->
						<div class="large-4 medium-4 small-4 columns m5r" style="padding:3px 0 0 20px;font-weight: bold;width: 130px;">
							<span class="size-16">
				  				<span ng-if="btx.action == 'received'">+</span>
				  				<span ng-if="btx.action == 'sent'">-</span>
				  				<span class="size-12" ng-if="btx.action == 'invalid'" translate> (possible double spend) </span>
				  				<span ng-if="btx.action != 'invalid'">  {{btx.amountStr}}   </span>
							</span>
						</div>

						<div class="large-3 medium-3 small-3 columns text-right" style=" width: 108px;">
							<div class="m5t size-12 text-gray">
								<time ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
								<span translate class="text-warning" ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)"> Unconfirmed  </span>
							</div>
						</div>

						<!--右箭头-->
						<div class="large-1 medium-1 small-1 columns text-right" style="width: 10px; float: right;">
							<i class="icon-arrow-right3 size-14 text-gray"></i>
						</div>

						<!--添加清楚浮动fix bug-->
						<div style="clear: both;"></div>

						<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
							<div ng-show="btx.message">
								<span translate>Note</span>
								: {{btx.message}}
							</div>

							<div ng-show="!btx.message">
								<span translate>To</span>
								: {{index.addressbook[btx.addressTo] || btx.addressTo}}
							</div>
						</div>
					</div>

					<div class="row m20t text-center" ng-show="index.historyRendering">
						<div class="columns large-12 medium-12 small-12">
							<div class="spinner">
								<div class="rect1"></div>
								<div class="rect2"></div>
								<div class="rect3"></div>
								<div class="rect4"></div>
								<div class="rect5"></div>
							</div>
						</div>
					</div>

					<div class="row m20t">
						<div class="large-6 medium-6 small-6 columns">
							<button type="submit" class="button black round expand" ng-show="index.historyShowShowAll"
									ng-click="index.showAllHistory()"
									style="background: transparent;color: #0095ff;font-size: 12px;padding: 10px;border: 1px solid #0095ff;" translate>
								Show all
							</button>
						</div>

						<!-- 判断isCordova 电脑端下载CSV文件 -->
						<div class="large-6 medium-6 small-6 columns" ng-show="!index.isCordova">
							<input id="export_file" type="file" nwsaveas="TrustNote-{{index.alias || index.walletName}}.csv" accept=".csv" style="display:none">
							<a class="button outline round" ng-click="index.csvHistory();" style="color: #0095ff;border: 1px solid #0095ff;font-size: 12px;padding: 10px;width: 100%;">
								<i class="fi-page-export-csv"></i>
								<span translate>Download CSV file</span>
							</a>
						</div>
					</div>
				</div>
				<div class="extra-margin-bottom"></div>
			</div>
			<!--判断isCordova  移动端  结束-->
		</div>
		<!-- <div style="margin-bottom: 60px;background: red;height: 10px;"></div> -->
		<!-- 交易记录 修改代码 -->
	</div>
	<!-- END tab1-WalletHome 结束 -->





		<!--原接受收款页 receive 开始 -->
		<!--原接受收款页  END Receive 结束-->




		<!--send页面 开始 交易页面 -->
		<div id="send" class="send tab-view">
			<div>
				<h4 class="title m0">

					<!--选择全部发送-->
					<a class="right lh" ng-if="index.availableBalanceBytes > 0 && !home.blockUx && !home.lockAmount" ng-click="home.sendAll(index.availableMaxBalance, 0)" translate> Send All</a>

					<!--可用余额-->
					<!--available-balance></available-balance-->
					<div>
                		<span class="db text-bold">
                    		<span class="size-12 color333" translate>Available Balance</span>:
                		</span>

						<select
							style="height: 45px; font-size: 14px;"
							class="m10t"
							ng-model="index.assetIndex"
							ng-options="index.arrBalances.indexOf(balance) as ( (balance.asset === 'base' || balance.asset == index.BLACKBYTES_ASSET ? balance.stableStr : balance.stable.toLocaleString() + ' of ' + balance.asset) + (balance.pending ? ' (confirmed)' : '') ) for balance in index.arrBalances"
							ng-disabled="home.blockUx || home.lockAsset"
							ng-change="home.bSendAll=false">
						</select>
					</div>
				</h4>
			</div>

			<div class="row m20t">
				<div class="large-12 large-centered columns">
					<form name="sendForm" ng-submit="home.submitForm()" ng-disabled="home.blockUx || home.onGoingProcess" novalidate>

						<!--无法发送交易-->
						<div class="box-notification" ng-show="home.error" ng-click="home.resetError()">
							<span class="text-warning">{{home.error|translate}}</span>
							<a class="close-notification text-warning">&#215;</a>
						</div>

						<div class="size-12" ng-hide="home.canSendExternalPayment()" style="margin-bottom: 15px" translate>
							This is a private asset, please send it only by clicking links in the chat or send it to your other wallets.
						</div>

						<div ng-hide="home.hideAddress">
							<div class="row collapse">
								<label for="address" class="left">
									<span class="size-12 color333" translate>To</span>
								</label>

								<!--判断地址是否有效 以显示图标 -- TO-->
								<span ng-hide="sendForm.address.$pristine">
                  					<span class="has-error right size-12" ng-show="sendForm.address.$invalid && _address">
                    					<i class="icon-notvalid size-14"></i>
                    					<span class="vm" translate>Not valid</span>
                  					</span>
                  					<small class="right text-primary" ng-show="!sendForm.address.$invalid">
                    					<i class="icon-valid size-14"></i>
                  					</small>
                				</span>
							</div>

							<div class="input">
								<input
									maxlength="32"
									style="height: 45px; font-size: 14px;padding-right:30px;"
									ng-show="sendForm.address.$invalid" class="m0" type="text" id="address"
									name="address"
									ng-disabled="home.blockUx || home.lockAddress || !home.canSendExternalPayment()"
									ng-attr-placeholder="{{(home.canSendExternalPayment() ? 'TrustNote address' : 'TrustNote address of your other wallet &#8594;')|translate}}"
									ng-model="_address" valid-address required ng-focus="home.formFocus('address')"
									ng-blur="home.formFocus(false)">

								<div class="addressbook-input" ng-show="!sendForm.address.$invalid && _address">
									{{index.addressbook[_address] || _address}}
								</div>

								<!--地址栏显示钱包图标-->
								<a
									style="line-height: 45px"
									class="postfix size-26 m0 text-gray"
									ng-hide="home.blockUx || home.lockAddress"
									ng-click="openDestinationAddressModal(index.otherWallets, _address)">
									<i class="icon-wallet size-26"></i>
								</a>
							</div>

							<!--绑定支付条件 智能合约-->
							<!--<div ng-if="home.deviceAddressIsKnown()" style="font-size: 12px; font-weight: bold; margin-top: -1rem; margin-bottom: 1.5rem">-->
								<!--<a ng-click="home.openBindModal()">-->
									<!--<span ng-if="!home.binding" translate >Bind the payment to a condition</span>-->
									<!--<span ng-if="home.binding" translate>This payment is bound to a condition</span>-->
								<!--</a>-->
							<!--</div>-->

							<!--<div id="binding-drop" class="f-dropdown" data-dropdown-content style="padding: 10px;" translate>To bind the payment to a condition, please click the peer's address in chat</div>-->

							<!--<div ng-if="!home.deviceAddressIsKnown()" style="font-size: 12px; font-weight: bold; margin-top: -1rem; margin-bottom: 1.5rem">-->
								<!--<a dropdown-toggle="#binding-drop" data-options="align:top">-->
									<!--<span translate class="text-gray">Bind the payment to a condition</span>-->
								<!--</a>-->
							<!--</div>-->
						</div>

						<!--发送金额数-->
						<div class="row" ng-hide="home.hideAmount">
							<div class="large-12 medium-12 columns">

								<div class="right" ng-hide="sendForm.amount.$pristine && !sendForm.amount.$modelValue ">
									<!--判断发送的金额是否有效-->
                  					<span class="has-error right size-12" ng-if="sendForm.amount.$invalid">
                    					<i class="icon-notvalid size-14"></i>
                    					<span clas="vm" translate>Not valid</span>
                  					</span>
									<small class="text-primary right" ng-if="!sendForm.amount.$invalid">
										<i class="icon-valid size-14"></i>
									</small>
								</div>

								<div>
									<label for="amount">
										<span class="size-12 color333" translate>Amount</span>
										<a ng-click="home.setSendAll()" ng-show="!home.bSendAll && !home.lockAmount" style="text-transform: none; margin-left: 10px;color:#0095ff;font-size: 12px;" translate>Send all</a>
									</label>
									<div class="input">


										<!--ng-minlength="0.00000001" ng-maxlength="10000000000"-->
										<input type="number" id="amount" minlength="0.000001" max="999999999.999999"
											   style="height: 45px; font-size: 14px; padding-right:30px;"
											   ng-disabled="home.blockUx || home.lockAmount || home.bSendAll"
											   name="amount"
											   ng-attr-placeholder="{{(home.bSendAll ? (index.arrBalances[index.assetIndex].asset === 'base' ? 'All minus fees' : 'All') : 'Amount')|translate}}"
											   ng-model="_amount"
											   valid-amount="{{index.arrBalances[index.assetIndex].asset}}"
											   ng-required="!home.bSendAll" autocomplete="off"
											   ng-focus="home.formFocus('amount')" ng-blur="home.formFocus(false)">

										<a style="line-height: 45px" class="postfix" ng-if="index.arrBalances.length > 0 && index.arrBalances[index.assetIndex].asset === 'base'">{{home.unitName}}</a>
										<!--<a class="postfix" ng-if="index.arrBalances.length > 0 && index.arrBalances[index.assetIndex].asset === index.BLACKBYTES_ASSET">{{home.bbUnitName}}</a>-->
										<a class="postfix" ng-if="index.arrBalances.length > 0 && index.arrBalances[index.assetIndex].asset !== 'base' && index.arrBalances[index.assetIndex].asset !== index.BLACKBYTES_ASSET">
											of {{index.arrBalances[index.assetIndex].asset.substr(0,4)}}
										</a>
									</div>
								</div>
              				</div>
            			</div>

						<div class="row" ng-show="index.bHasMerkle">
							<div class="large-12 columns">
								<label for="merkle_proof">
									<span translate>Merkle proof</span>
									<small translate ng-hide="!sendForm.merkle_proof.$pristine">optional</small>
									<small translate class="has-error" ng-show="sendForm.merkle_proof.$invalid && !sendForm.merkle_proof.$pristine">
										too long!
									</small>
								</label>

								<div class="input">
									<textarea id="merkle_proof" ng-disabled="home.blockUx" name="merkle_proof" maxlength="4096" ng-model="_merkle_proof"></textarea>
								</div>
							</div>
						</div>

						<div class="row" ng-hide="home.hideNote">
							<div class="large-12 columns">
								<label for="comment">
									<span translate>Note</span>
									<small translate ng-hide="!sendForm.comment.$pristine">optional</small>
									<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">
										too long!
									</small>
								</label>

								<div class="input">
                  					<textarea id="comment" ng-disabled="home.blockUx" name="comment" ng-maxlength="500" ng-model="_comment" ng-focus="home.formFocus('msg')" ng-blur="home.formFocus(false)"></textarea>
								</div>
							</div>
						</div>

						<div class="" ng-show="index.m < index.n && index.m > 1">
							<div class="large-12 medium-12">
								<label>
									<span translate>Who signs:</span>
								</label>

								<ul class="no-bullet m20b whopays">
									<li class="" ng-repeat="copayer in index.copayers">
                          				<span class="size-12 text-gray" ng-show="copayer.me">
                              				<i class="icon-contact size-24 m10r"></i>
											{{'Me'|translate}}
											<i class="fi-check m5 right"></i>
                          				</span>

										<div class="size-12" style="width: 100%" ng-show="!copayer.me" ng-click="copayer.signs = !copayer.signs">
											<i class="icon-contact size-24 m10r"></i>
											{{copayer.name}}   ({{copayer.device_address.substr(0,4)}}...)
											<i class="m5 right" ng-class="copayer.signs ? 'fi-check' : ''"></i>
										</div>
									</li>
								</ul>
							</div>
						</div>


						<!--点击发送notes-->
						<div class="row" ng-show="!home.onGoingProcess">

							<div class="large-6 medium-6 small-6 columns" ng-show="!home.blockUx && (home.lockAddress || home.lockAmount || home.bSendAll)">
								<a ng-click="home.resetForm(sendForm)" class="button expand outline dark-gray round black size-14" translate>Cancel</a>
							</div>

							<div class="columns" ng-class="{'small-6 medium-6 large-6':(home.lockAddress || home.lockAmount || home.bSendAll)}">
								<button type="submit" class="button black round expand bg0745bc size-14"
										ng-disabled="home.current_payment_key || sendForm.$invalid || home.blockUx || index.isOffline || !index.isEnoughSignersSelected()"
										translate>
									Send
								</button>
							</div>

						</div>
					</form>
				</div>
			</div>

			<!--div class="row columns m20t" ng-hide="home.canSendPayment()">This is a private asset, please send it only by clicking links in the chat.</div-->
      		<div class="extra-margin-bottom"></div>
    	</div>
		<!-- END Send 交易页面 结束-->

		<!-- history 开始  原交易历史迁移至首页-->
		<!-- END History 结束  原交易历史迁移至首页 -->

		<div id="{{view.id}}" class="{{view.class}} tab-view" ng-repeat="view in index.addonViews" ng-include="view.template"> </div>
  	</div>
</div>
<!-- <h1 style="z-index: 999;"> this is history - walletHome000</h1>  这儿 前两个tab栏的内容页  -->

<!-- 333 margin-bottom -->
<div class="extra-margin-bottom"></div>

<!-- 444 -- tab底部标签栏 -->
<div ng-include="'views/includes/menu.html'" ng-show="!index.noFocusedWallet"></div>



